﻿<%@ Page Language="C#" AutoEventWireup="true" CodeBehind="OControlTicketList.aspx.cs" Inherits="IHISCETeim.Web.MachineSys.MacModel.OControlTicketList" %>
<form id="pagerForm" method="post" action="MacModel/OControlTicketList.aspx">
<input type="hidden" name="ItemCode" value="<%=ItemCode %>" />
<input type="hidden" name="TNO" value="<%=TNO %>" />
<input type="hidden" name="SerialNumber1" value="<%=SerialNumber1%>" />
<input type="hidden" name="SupplierName" value="<%=SupplierName%>" />
<input type="hidden" name="ControlReason" value="<%=ControlReason%>" />
<input type="hidden" name="ApprovalDateFrom" value="<%=ApprovalDateFrom%>" />
<input type="hidden" name="ApprovalDateTo" value="<%=ApprovalDateTo%>" />
<input type="hidden" name="orderField" value="<%=orderField %>" />
<input type="hidden" name="orderDirection" value="<%=orderDirection %>" />
<input type="hidden" name="pageNum" value="1" />
<input type="hidden" name="numPerPage" value="<%=numPerPage %>" />
</form>
<form id="form1" runat="server" method="post" action="MacModel/OControlTicketList.aspx" onsubmit="return navTabSearch(this);">
<div class="pageHeader">
    <div class="searchBar">
        <table class="searchContent">
            <tr>
                <td>
                    编号： 
                </td>                
                <td>
                   <input name="TNO" type="text" value="<%=TNO %>"  />
                </td>
                <td>
                    物料号/名称： 
                </td>
                
                <td>
                   <input name="ItemCode" type="text" value="<%=ItemCode %>"  autocompletehref="<%=AutoCompleteRequestUrl %>?ajaxmethod=getoitmlist" swidth="300"/>
                </td>
                <td>管制机号:</td>
                <td>
                    <input name="SerialNumber1" style="width:80px!important;" type="text" value="<%=SerialNumber1 %>" />
                </td>
                <td>管制理由：</td>
                <td >
                    <%=GetControlReason("ControlReason",ControlReason) %>
                </td>
                 <td>
                   供应商： 
                </td>
                <td>
                <input name="SupplierName" type="text" value="<%=SupplierName %>" />
                </td>
            </TR>
            <TR>
                <td>核准日期：</td>
                <td colspan="8">
                    从<input name="ApprovalDateFrom" class="date" type="text" value="<%=ApprovalDateFrom %>"  />到<input name="ApprovalDateTo" type="text" class="date" value="<%=ApprovalDateTo %>"  />
                </td>
                <td>
                    <div class="subBar">
                        <ul>
                            <li>
                                <div class="buttonActive"><div class="buttonContent"><button type="submit">检索</button></div></div>
                            </li>
                        </ul>
                    </div>
                </td>
            </tr>
        </table>
        
    </div>
</div>
<div class="pageContent muchtrtable">
    <div class="panelBar">
        <ul class="toolBar">
          <% if (HasPower(IHISCETeim.Web.Permission.新增))
             {%>
            <li><a class="add" href="MacModel/OControlTicketAdd.aspx" target="navTab" rel="OControlTicketAdd"  title="添加初加工物管制票" ><span>添加</span></a></li>
           <%} %>
           <% if (HasPower(IHISCETeim.Web.Permission.修改))
              {%>
            <li><a class="edit" href="MacModel/OControlTicketEdit.aspx?TNO={sid_user}" target="navTab" rel="OControlTicketEdit" title="修改初加工物管制票"><span>修改</span></a></li>
          <%} %>
            <% if (HasPower(IHISCETeim.Web.Permission.删除))
               {%>
            <li><a class="delete" href="sysAjaxDone.ashx?ajaxmethod=DeleteOControlTicket&TNO={sid_user}" target="ajaxTodo" title="确定要删除吗?"><span>删除</span></a></li>
           <%} %>
            <% if (HasPower(IHISCETeim.Web.Permission.导出))
             {%>
            <li><a class="icon" href="MacModel/ExeclOControlTicket.aspx?ItemCode=<%=ItemCode %>" target="_blank" title="确定要导出吗?"><span>导出</span></a></li>
            <%} %>
        </ul>
    </div>
    
    <table class="table" width="2500" layouth="137">
        <thead>
            <tr  >                
                <th width="8%" orderField="MachineType" class="asc">机型</th>
                <th width="6%" orderField="TNO" class="asc">编号</th>
                <th width="6%" orderField="SetNumber" class="asc">设变号码</th>
                <th width="6%" orderField="SupplierName" class="asc">供应商</th>
                <th width="6%">管制理由</th>
                <th width="6%" orderField="ItemCode" class="asc">物料号</th>
                <th width="6%">物料名称</th>
                <th width="6%" align="center">数量</th>
                <th width="6%" orderField="OpenDate" class="asc">开出日期</th>
                <th width="6%" orderField="ApprovalDate" class="asc">核准日期</th> 
                <th width="6%" orderField="QualityJudgement" class="asc">质量部判定</th>
                <th>管制机号</th>       
            </tr>
        </thead>
        <tbody>
    <asp:repeater id="rpMenu" runat="server">
      
        <ItemTemplate>
            <tr target="sid_user" rel="<%# Eval("TNO") %>">
				<td ><%# Eval("MachineType")%></td>
                <td>
                  
                  <a target="_blank" class="<%# Eval("AttachmentFile").ToString()==""?"":"btnDownload"%>" href=" <%# Eval("AttachmentFile")%>" title="查看扫描件"><%# Eval("TNO")%></a>
                </td>
                  <td><%# Eval("SetNumber ")%></td>
                <td><%# Eval("SupplierName")%></td>
                <td ><%# Eval("ControlReason")%></td>
                <td >
                    <%# Convert.ToInt32(Eval("tt")) > 0 ? "<a href='MacModel/OMarketQualificationList.aspx?ItemCode="+Eval("ItemCode")+"' style='color:red;' target='navTab' rel='OMarketQualificationList'  title='市场验证记录' >"+Eval("ItemCode") +"</a>" : Eval("ItemCode")%>
                   
                    
                   
                </td>              
                <td><%# Eval("ItemName")%></td>
                <td >
                    <%# Eval("Quantity")%>
                </td>
				<td >
                    <%# Convert.ToDateTime(Eval("OpenDate")).ToShortDateString()%>
                </td>
                <td ><%# Convert.ToDateTime(Eval("ApprovalDate")).ToShortDateString()%></td>
                <td><%# Eval("QualityJudgement")%></td>
                <td><%# Eval("SerialNumber1")%></td>
			</tr>
           
        </ItemTemplate>
        
    </asp:repeater>
                </tbody>
         </table>
  
    <div class="panelBar">
        <div class="pages">
            <span>显示</span>
            <select class="combox" name="numPerPage" onchange="navTabPageBreak({numPerPage:this.value})">
               <%=SetnumPerPage() %>
            </select>
            <span>条，共<%=TotalCount%>条</span>
        </div>
        <div class="pagination" targettype="navTab" totalcount="<%=TotalCount%>" numperpage="<%=numPerPage %>"
            pagenumshown="10" currentpage="<%=pageNum %>">
        </div>
    </div>
</div>
</form>
